<?php
namespace app\admin\controller;
use app\admin\model\Goods;

/**
 * 评价管理
 * Class Member
 */
class EvaluateController extends BaseController {

    protected function _initialize() {
        parent::_initialize();
    }

    /**
     * 评价管理
     * @param string $keyword
     * @param int    $page
     * @return mixed
     */
    public function index($keyword = '', $ziduan = 'id', $param='add_time', $sort='desc') {
        $map = [];
		$order = $param. ' '.$sort;
		$this->assign('param', $param);
		$this->assign('sort', $sort);
        if ($keyword) {
            $map[$ziduan] = $keyword;
        }
		$this->assign('ziduan', $ziduan);
        $comment_list = db('good_comment')->where($map)->order($order)->paginate(15, false, get_query());
        return $this->fetch('index', ['comment_list' => $comment_list, 'keyword' => $keyword]);
    }

}
